<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 节点表 基类
 * @Entity
 * @Table(name="fa_auth_rule", id={"id"})
 * @DDL("CREATE TABLE `fa_auth_rule` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` enum('menu','file') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'file' COMMENT 'menu为菜单,file为权限节点',
  `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '规则名称',
  `title` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '规则名称',
  `icon` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '图标',
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '规则URL',
  `condition` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '条件',
  `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '备注',
  `ismenu` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为菜单',
  `menutype` enum('addtabs','blank','dialog','ajax') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '菜单类型',
  `extend` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '扩展属性',
  `py` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '拼音首字母',
  `pinyin` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '拼音',
  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
  `status` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '状态',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`) USING BTREE,
  KEY `pid` (`pid`),
  KEY `weigh` (`weigh`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点表'")
 * @property int $id 
 * @property string $type menu为菜单,file为权限节点
 * @property int $pid 父ID
 * @property string $name 规则名称
 * @property string $title 规则名称
 * @property string $icon 图标
 * @property string $url 规则URL
 * @property string $condition 条件
 * @property string $remark 备注
 * @property int $ismenu 是否为菜单
 * @property string $menutype 菜单类型
 * @property string $extend 扩展属性
 * @property string $py 拼音首字母
 * @property string $pinyin 拼音
 * @property int $createtime 创建时间
 * @property int $updatetime 更新时间
 * @property int $weigh 权重
 * @property string $status 状态
 */
abstract class AuthRuleBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * menu为菜单,file为权限节点
     * type
     * @Column(name="type", type="enum", length=0, accuracy=0, nullable=false, default="file", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $type;

    /**
     * 获取 type - menu为菜单,file为权限节点
     *
     * @return string
     */ 
    public function getType()
    {
        return $this->type;
    }

    /**
     * 赋值 type - menu为菜单,file为权限节点
     * @param string $type type
     * @return static
     */ 
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

    /**
     * 父ID
     * pid
     * @Column(name="pid", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $pid;

    /**
     * 获取 pid - 父ID
     *
     * @return int
     */ 
    public function getPid()
    {
        return $this->pid;
    }

    /**
     * 赋值 pid - 父ID
     * @param int $pid pid
     * @return static
     */ 
    public function setPid($pid)
    {
        $this->pid = $pid;
        return $this;
    }

    /**
     * 规则名称
     * name
     * @Column(name="name", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 规则名称
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 规则名称
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 规则名称
     * title
     * @Column(name="title", type="varchar", length=50, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $title;

    /**
     * 获取 title - 规则名称
     *
     * @return string
     */ 
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * 赋值 title - 规则名称
     * @param string $title title
     * @return static
     */ 
    public function setTitle($title)
    {
        $this->title = $title;
        return $this;
    }

    /**
     * 图标
     * icon
     * @Column(name="icon", type="varchar", length=50, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $icon;

    /**
     * 获取 icon - 图标
     *
     * @return string
     */ 
    public function getIcon()
    {
        return $this->icon;
    }

    /**
     * 赋值 icon - 图标
     * @param string $icon icon
     * @return static
     */ 
    public function setIcon($icon)
    {
        $this->icon = $icon;
        return $this;
    }

    /**
     * 规则URL
     * url
     * @Column(name="url", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $url;

    /**
     * 获取 url - 规则URL
     *
     * @return string
     */ 
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * 赋值 url - 规则URL
     * @param string $url url
     * @return static
     */ 
    public function setUrl($url)
    {
        $this->url = $url;
        return $this;
    }

    /**
     * 条件
     * condition
     * @Column(name="condition", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $condition;

    /**
     * 获取 condition - 条件
     *
     * @return string
     */ 
    public function getCondition()
    {
        return $this->condition;
    }

    /**
     * 赋值 condition - 条件
     * @param string $condition condition
     * @return static
     */ 
    public function setCondition($condition)
    {
        $this->condition = $condition;
        return $this;
    }

    /**
     * 备注
     * remark
     * @Column(name="remark", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $remark;

    /**
     * 获取 remark - 备注
     *
     * @return string
     */ 
    public function getRemark()
    {
        return $this->remark;
    }

    /**
     * 赋值 remark - 备注
     * @param string $remark remark
     * @return static
     */ 
    public function setRemark($remark)
    {
        $this->remark = $remark;
        return $this;
    }

    /**
     * 是否为菜单
     * ismenu
     * @Column(name="ismenu", type="tinyint", length=1, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $ismenu;

    /**
     * 获取 ismenu - 是否为菜单
     *
     * @return int
     */ 
    public function getIsmenu()
    {
        return $this->ismenu;
    }

    /**
     * 赋值 ismenu - 是否为菜单
     * @param int $ismenu ismenu
     * @return static
     */ 
    public function setIsmenu($ismenu)
    {
        $this->ismenu = $ismenu;
        return $this;
    }

    /**
     * 菜单类型
     * menutype
     * @Column(name="menutype", type="enum", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $menutype;

    /**
     * 获取 menutype - 菜单类型
     *
     * @return string
     */ 
    public function getMenutype()
    {
        return $this->menutype;
    }

    /**
     * 赋值 menutype - 菜单类型
     * @param string $menutype menutype
     * @return static
     */ 
    public function setMenutype($menutype)
    {
        $this->menutype = $menutype;
        return $this;
    }

    /**
     * 扩展属性
     * extend
     * @Column(name="extend", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $extend;

    /**
     * 获取 extend - 扩展属性
     *
     * @return string
     */ 
    public function getExtend()
    {
        return $this->extend;
    }

    /**
     * 赋值 extend - 扩展属性
     * @param string $extend extend
     * @return static
     */ 
    public function setExtend($extend)
    {
        $this->extend = $extend;
        return $this;
    }

    /**
     * 拼音首字母
     * py
     * @Column(name="py", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $py;

    /**
     * 获取 py - 拼音首字母
     *
     * @return string
     */ 
    public function getPy()
    {
        return $this->py;
    }

    /**
     * 赋值 py - 拼音首字母
     * @param string $py py
     * @return static
     */ 
    public function setPy($py)
    {
        $this->py = $py;
        return $this;
    }

    /**
     * 拼音
     * pinyin
     * @Column(name="pinyin", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $pinyin;

    /**
     * 获取 pinyin - 拼音
     *
     * @return string
     */ 
    public function getPinyin()
    {
        return $this->pinyin;
    }

    /**
     * 赋值 pinyin - 拼音
     * @param string $pinyin pinyin
     * @return static
     */ 
    public function setPinyin($pinyin)
    {
        $this->pinyin = $pinyin;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 更新时间
     * updatetime
     * @Column(name="updatetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $updatetime;

    /**
     * 获取 updatetime - 更新时间
     *
     * @return int
     */ 
    public function getUpdatetime()
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间
     * @param int $updatetime updatetime
     * @return static
     */ 
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = $updatetime;
        return $this;
    }

    /**
     * 权重
     * weigh
     * @Column(name="weigh", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $weigh;

    /**
     * 获取 weigh - 权重
     *
     * @return int
     */ 
    public function getWeigh()
    {
        return $this->weigh;
    }

    /**
     * 赋值 weigh - 权重
     * @param int $weigh weigh
     * @return static
     */ 
    public function setWeigh($weigh)
    {
        $this->weigh = $weigh;
        return $this;
    }

    /**
     * 状态
     * status
     * @Column(name="status", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $status;

    /**
     * 获取 status - 状态
     *
     * @return string
     */ 
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态
     * @param string $status status
     * @return static
     */ 
    public function setStatus($status)
    {
        $this->status = $status;
        return $this;
    }

}
